﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DaveSexton.Labs
{
	/// <summary>
	/// Defines flags that specify how labs are discovered by the 
	/// <see cref="LabController"/> when using a <see cref="LabCatalog"/>.
	/// </summary>
	[Flags]
	public enum LabActivationStrategies
	{
		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to not run any labs.
		/// </summary>
		None = 0,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute all labs that are returned
		/// by the <see cref="LabCatalog.PriorityLabs"/> property.
		/// </summary>
		/// <remarks>
		/// <alert type="note">
		/// Labs returned by <see cref="LabCatalog.PriorityLabs"/> are executed before all discovered 
		/// labs when both the <see cref="CatalogLabs"/> and <see cref="DiscoveredLabs"/> 
		/// flags are specified.
		/// </alert>
		/// </remarks>
		CatalogLabs = 1,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute all discovered labs.
		/// </summary>
		/// <remarks>
		/// <alert type="note">
		/// Labs returned by <see cref="LabCatalog.PriorityLabs"/> are executed before all discovered 
		/// labs when both the <see cref="CatalogLabs"/> and <see cref="DiscoveredLabs"/> 
		/// flags are specified.
		/// </alert>
		/// </remarks>
		DiscoveredLabs = 2,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute only those discovered labs 
		/// that are of the types specified in <see cref="LabCatalog.LabTypes"/>.  This flag 
		/// is only meaningful when <see cref="DiscoveredLabs"/> is also specified.
		/// </summary>
		/// <remarks>
		/// <alert type="note">
		/// <see cref="DiscoverExplicitLabTypesOnly"/> and <see cref="ExcludeCatalogLabTypesFromDiscovery"/> 
		/// are mutually exclusive.  If both flags are specified, then  
		/// <see cref="DiscoverExplicitLabTypesOnly"/> is applied.
		/// </alert>
		/// </remarks>
		DiscoverExplicitLabTypesOnly = 4,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute only those discovered labs 
		/// that are not of the types specified in <see cref="LabCatalog.LabTypes"/>.  This 
		/// flag is only meaningful when <see cref="DiscoveredLabs"/> is also specified.
		/// </summary>
		/// <remarks>
		/// <alert type="note">
		/// <see cref="DiscoverExplicitLabTypesOnly"/> and <see cref="ExcludeCatalogLabTypesFromDiscovery"/> 
		/// are mutually exclusive.  If both flags are specified, then  
		/// <see cref="DiscoverExplicitLabTypesOnly"/> is applied.
		/// </alert>
		/// </remarks>
		ExcludeCatalogLabTypesFromDiscovery = 8,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute all labs that are returned
		/// by the <see cref="LabCatalog.PriorityLabs"/> property, followed by all discovered labs.
		/// This flag is a combination of <see cref="CatalogLabs"/> and <see cref="DiscoveredLabs"/>.
		/// </summary>
		All = CatalogLabs | DiscoveredLabs,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute all labs that are returned
		/// by the <see cref="LabCatalog.PriorityLabs"/> property, followed by all discovered labs 
		/// of the types specified in <see cref="LabCatalog.LabTypes"/>.  This flag is a 
		/// combination of <see cref="All"/> and <see cref="DiscoverExplicitLabTypesOnly"/>.
		/// </summary>
		AllByCatalog = All | DiscoverExplicitLabTypesOnly,

		/// <summary>
		/// Instructs the <see cref="LabContoller"/> to execute all labs that are returned
		/// by the <see cref="LabCatalog.PriorityLabs"/> property, followed by all discovered labs of
		/// types that are not specified in <see cref="LabCatalog.LabTypes"/>.  This flag is a 
		/// combination of <see cref="All"/> and <see cref="ExcludeCatalogLabTypesFromDiscovery"/>.
		/// </summary>
		AllWithExclusions = All | ExcludeCatalogLabTypesFromDiscovery
	}
}
